Skip to content

feat(studio): Studio's top-left rows, the package switcher and the rail - #37579

Draft
objectstack-fleet[bot] wants to merge 7 commits into
mainfrom
claude/project-thread-vyx9gu
Draft

objectstack-fleet[bot] wants to merge 7 commits into
mainfrom
claude/project-thread-vyx9gu

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread

Fixes #37456

Clause-②: no
Metadata-protocol: none

维护者速读

What changes

Half 1 of 2 (this push). Studio's left column gets the two top-left rows the ADR-0084 amendment (#amendment-2026-11-26-frame, #amendment-2026-11-26-homes) gives it, built as their own files so #37553's split of StudioDesignSurface.tsx is not disturbed. The top bar is still drawn; it is deleted in half 2, after #37454 lands.

  • StudioTopLeft.tsx (new). Row 1 (StudioBrandRow): Studio's graphite mark, its name (engine.studio.mark, the existing key; App Studio 改版(3-3):显示名改为「应用搭建 / App Studio」——应用标签与多语言文案(只改界面显示) #37566 retranslates it), the collapse control. Row 2 (StudioPackageRow): the way back, then the package switcher. Collapsed on desktop, the column is a rail (studio-rail-head): expand control, way back, app logo, stacked.
  • StudioPackageSwitcher.tsx (new). A popover naming the open package by its app (logo via AppMark, label via navItemLabelText, else the package name), with a lock when read-only. The list holds the openable packages: kernel packages out, .custom pairs folded ("with PAIR"), ~org / ~all not listed; a search box; the current row checked. Picking a package passes beforeNavigate (the unsaved-changes guard) and opens it. The last row, New package (authors only), opens the existing CreatePackageDialog (「新建包」对话框加一个「同时创建应用」勾选项(默认勾上),勾上时建包的同时建好它的应用;取消勾选只建包 #37134) and opens the created package. The list reloads on objectui:packages-changed; a failed read toasts under the shared PACKAGE_LIST_TOAST_ID.
  • StudioBackToApp.tsx. Adds StudioBackButton, the chevron-only way back with the same target as studioBackTarget. Its own testid (studio-package-back) so it does not clash with the top bar's studio-back-to-app while both exist.
  • StudioTitleRowFallback.tsx (new). The panel control (and save / assistant) for a page that draws no title row (loading, not found). It registers as a title row after the page in document order, so the page's own title row always wins and this draws only when there is none.
  • StudioMenu.tsx. A head slot at the top of the menu header; collapsible moves from offcanvas to icon (the rail); search and the advanced toggle hide on the rail; each menu item gets a tooltip, shown only on the rail.
  • StudioDesignSurface.tsx. Mounts StudioTopLeft as the menu's head and StudioTitleRowFallback after the pillars. The top bar's own menu toggle is removed (the toggle now lives in row 1, so the page never draws two).
  • i18n. engine.studio.pkg.switcher, .search, .noMatches, .newPackage (en, zh).

Tests

  • StudioTopLeft-37456.test.tsx (new, 11 cases): the two rows and their order; naming by the app; the lock on a read-only package and its control (writable: no lock); the list folds a pair and checks the open package; pick opens a package; re-picking the open one does nothing; a declined leave keeps the page; search and its empty state; New package (authors only) opens the create dialog and then the created package; the package-less scope; the rail; the fallback with and without a page title row.
  • Re-pointed, not weakened: homeLoop-12513 now asserts the way back is the first button of the package row and the toggle sits in Studio's row; rightSlot-12725 waits for the assistant inside the list's title row (the fallback holds it while the list loads); the PackageFormDialog.newAppStep-36748 door census adds the switcher's New package door.
  • Ablations (each restored, git diff HEAD empty): the lock condition forced false, the lock case red; the fallback's drawn forced false, the fallback case red.
Readings
  • StudioTopLeft-37456, homeLoop-12513, rightSlot-12725, PackageFormDialog.newAppStep-36748, the studio-design and i18n suites: 16 test files, all passed. At the head: StudioTopLeft-37456 Tests 11 passed (11).
  • @object-ui/app-shell sources and tsconfig.test.json: 0 errors; full workspace build (docs excluded) 123/123 tasks green.
  • Derived gate families (dispatch-gates.mjs --commands, 39): 37 exit 0 in the batch run; check:test-source-alias was red on the new suite (a clocked first load of @objectstack/lint through the create dialog) and is fixed by a module-top import, now OK; vitest run scripts/ was killed by the container's memory limit in the batch and passes alone at 2 workers: Test Files 172 passed | 2 skipped (174).

Acceptance notes

Verification

Read first, by risk:

  1. StudioPackageSwitcher.tsx: the pick path (beforeNavigate before every navigation, including after create) and the list filter (kernel out, pairs folded).
  2. StudioMenu.tsx: collapsible="icon" and the RAIL_HIDDEN classes (a missed class leaves a half-drawn control on the rail).
  3. StudioTitleRowFallback.tsx and its mount point in StudioDesignSurface.tsx (it must stay after the page in document order).
  4. StudioBackButton in StudioBackToApp.tsx (same target as the top bar's way back).

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic. (not touched)
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint passes.
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: n/a.
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.
  • The Before Submitting list in CONTRIBUTING.md is done.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Utp6CYYe7UScDrgUJxx5iP

@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 26, 2026
@github-actions github-actions Bot added the tests label Nov 26, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/l tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants